package cn.golxen.blog.mapper;

import cn.golxen.blog.commons.vo.GetDateListVo;
import cn.golxen.blog.commons.vo.GetEssayListByDateVo;
import cn.golxen.blog.commons.vo.SearchTitleVo;
import cn.golxen.blog.commons.vo.UpdateEssayVo;
import cn.golxen.blog.entity.Essay;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface EssayMapper {
    Integer addEssay(Essay essay);
    List<Essay> getList();
    Integer deleteList(List<String> list);
    Essay getEssayById(String id);
    Integer updateEssayById(UpdateEssayVo updateEssayVo);
    Integer addViewById(@Param("essayId")String essayId, @Param("views")Integer views);
    Integer getViewById(String essayId);
    Integer getCountOfCategory(String category);
    Set<Essay> getEssaySetByCategory(String category);
    Set<Essay> getEssaySetByLabel(String label);
    Integer getCount();
    Set<SearchTitleVo> getEssaySetByTitle(String title);
    List<GetDateListVo> getDateList();
    List<GetEssayListByDateVo> getEssayListByDate(String date);
}
